public class Overload {

    public static int max(int a,int b) {
        if (a>b) {
            return a;
        }
        else {
            return b;
        }
    }

    public static double max(double a,double b) {
        if (a>b) {
            return a;
        }
        else {
            return b;
        }
    }

    public static double max(double a,double b,double c) {
        double max=a;
        if(b>max) max=b;
        if(c>max) max=c;
        return max;
    }

    public static double max(double ...x) {
        double max = x[0];
        for (int i =1; i<x.length; i++){
            if (x[i]>max) {
                max = x[i];
            }
        }
        return max;
    }

    public static void main(String[] args) {
        System.out.println(max(5,9));
        System.out.println(max(4.6,9,2,7,8,9,6,5,1,2,4,5,6,4,7,8,100,9,1));
        System.out.println(max(1,6,2));
    }

}
